<template>
   <div class="success-wrapper">
     <van-image
        width="120"
        height="120"
        :src="`${staticPath}/icon_chengong@2x.png`"
      />
      <h2>提交成功</h2>
      <p>您已预约成功，请注意接听工作人员电话。</p>
      <div class="btn-wrapper">
        <van-button color="#4ECE40" @click="handleRediector">查看我的预约</van-button>
      </div>
   </div>
</template>

<script>
export default {
  props:{
    redirectUrl: {
      type: String,
      default: ''
    }
  },
   data () {
      return {
        staticPath: process.env.VUE_APP_STATIC_PATH
      };
   },

   components: {},

   computed: {},

   methods: {
     handleRediector(){
       this.$router.replace({
         path: this.redirectUrl
       })
     }
   }
}
</script>
<style lang='less'>
.success-wrapper{
  padding: 120px 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  h2{
    font-size: 18px;
    color: #000;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
  }
  p{
    font-size: 14px;
    color: #999;
    text-align: center;
  }
  .btn-wrapper{
    margin-top: 120px;
  }
}
</style>